﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ScreenMonitor.Common;

namespace ProcessManagerPlugin.Common
{
    public class ProcessInfoObj:MemoryStreamSendableObjectBase<ProcessInfoObj>
    {
        /// <summary>
        /// 进程名
        /// </summary>
        public string ProcessName { get; set; }
        /// <summary>
        /// 进程Id
        /// </summary>
        public int Id { get; set; }

        public override void ToStream(System.IO.BinaryWriter sw)
        {
            sw.Write(ProcessName);
            sw.Write(Id);
        }

        public override void FromStream(System.IO.BinaryReader sr)
        {
            this.ProcessName = sr.ReadString();
            this.Id = sr.ReadInt32();
        }

    }
}
